package restaurant;

/**
 * Represents an item's rating. A {@code Rating} is a type of {@code comment}
 * about a specific menu item. This class contains information about the item
 * ratings submitted by customers.
 * 
 * @author Odessa
 * @see Comment
 */
public class Rating extends Comment
{
	/** The item number. */
	private int itemNo;

	/** The item rating. */
	private int rating;



	/**
	 * Instantiates a newly created rating.
	 * 
	 * @param commentNo the comment number of the rating to be created.
	 * @param itemNo the item number of the item being rated. Cannot be null.
	 * @param rating the rating for the item.
	 * @param comment a {@code String} representing this item comment.
	 */
	public Rating(int commentNo, int itemNo, int rating, String comment) {
		super(commentNo, comment);
		this.itemNo = itemNo;
		this.rating = rating;
	}



	/**
	 * Instantiates a newly created rating which does not include a comment
	 * about the item.
	 * 
	 * @param commentNo the comment number of the rating to be created.
	 * @param itemNo the item number of the item being rated. Cannot be null.
	 * @param rating the rating for the item.
	 */
	public Rating(int commentNo, int itemNo, int rating) {
		super(commentNo);
		this.itemNo = itemNo;
		this.rating = rating;
	}



	/**
	 * Gets the item number of the item being rated.
	 * 
	 * @return the item number.
	 */
	public int getItemNo()
	{
		return itemNo;
	}



	/**
	 * Gets the item rating.
	 * 
	 * @return the item rating.
	 */
	public int getRating()
	{
		return rating;
	}
}
